package com.gpjcjl.database;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.gpjcjl.entity.Record;

import java.util.List;

@Dao
public interface RecordDao {

    @Query("SELECT * FROM record")
    List<Record> findAll();

    @Query("SELECT * FROM record WHERE id = :id")
    Record findById(String id);

    @Insert
    void insertAll(Record... records);

    @Delete
    void delete(Record record);

    @Update
    void update(Record record);
}
